﻿using System;
using System.Collections.Generic;

using ShippingManage.DataAccessor.Interfaces;
using ShippingManage.Models;


namespace ShippingManage.Services
{
	// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ShippingManageService" in code, svc and config file together.
	public class ShippingManageService : IShippingManageService
	{

		public void DoWork()
		{
		}

		public bool UserMustSync(IVersionInfo version)
		{
			bool result = false;

			//var model = new VersionInfoModel();
			//VersionInfo currentVersion = null;
			//try
			//{
			//  currentVersion = model.Get((DataTypes)version.DataType, version.ItemId);
			//}
			//catch (Exception ex)
			//{
			//}

			//result = currentVersion == null || currentVersion.Version < version.Version;

			return result;
		}

		public void UserSync(IMembershipUser obj)
		{

		}

		public List<IHouseAirWayBill> SearchHAWB(
			string prepairBy,
			int consolNo,
			string consigee,
			string tel,
			string fax,
			DateTime date,
			int mawb,
			string airportOfDept,
			string airportOfDest,
			string ftpNo,
			DateTime etd,
			DateTime eta,
			string carrier
			)
		{
			HouseAirWayBillModel model = new HouseAirWayBillModel();
			//model.SearchHAWB(prepairBy, consolNo, consigee, tel, fax, date, mawb, airportOfDept, airportOfDest, ftpNo, etd, eta, carrier);
			return new List<IHouseAirWayBill>();
		}
	}
}
